point before the newline.
;; Don't parse the first two lines as error messages.
;; This matters for grep.
(if (bobp)
- (forward-line 2))
+ (progn
+ (forward-line 2)
+ ;; Move back so point is before the newline.
+ ;; This matters because some error regexps use \n instead of ^
+ ;; to be faster.
+ (forward-char -1)))
;; Compile all the regexps we want to search for into one.
(setq regexp (concat "\\(" compilation-enter-directory-regexp "\\)\\|"